const userBase = 'm/UserInfo.do?method=';
const sendMessageBase = 'm/SendMessage.do?method=';
const orderBase = 'm/Order.do?method=';
const payBase = 'm/Pay.do?method=';
const baseDataBase = 'm/BaseData.do?method=';
const schoolBase = 'm/School.do?method=';
const newsBase = 'm/NewsInfo.do?method=';

const basePath = "../";

const base = {
		urls:{
			token: {
				getToken: '/auth/login',
				getUserByToken: '/auth/getUserByToken'
			},
			login: {
				login: 'm/Login.do?method=login'
			},
			user: {
				getUserInfo: userBase + 'getUserInfo', //获取用户信息
				register: userBase + 'register', //注册用户
				bindMobile: userBase + 'bindMobile', //绑定手机号码
				updatePassword: userBase + 'updatePassword', //更新密码
			},
			sendMessage: {
				register: sendMessageBase + 'register', //发送注册短信
				updatePassword: sendMessageBase + 'updatePassword', //发送更新密码短信
				bindMobile: sendMessageBase + 'bindMobile', //绑定手机短信
			},
			order: {
				save: orderBase + 'createOrder', //创建更新订单
				createOrderTip: orderBase + 'createOrderTip', //创建更新订单
				list: orderBase + 'list', //订单列表
				view: orderBase + 'getOrderInfoById', //订单详情
				updateOrder: orderBase + 'updateOrder', //更新订单状态
			},

			baseData: {
				list: baseDataBase + 'getData'
			},
			newsInfo: {
				getAjaxData: newsBase + 'getAjaxData'
			}
		},
		pagePath: function() {
			const path = {
				home: {
					home: basePath + 'home/home', //个人中心
				},
				index: {
					index: basePath + 'index/index', //首页
				},
				login: {
					login: basePath + 'login/login', //登录
				},
				order: {
					list: basePath + 'order/list', //订单列表
					view: basePath + 'order/view', //订单详情
					form: basePath + 'order/form', //订单修改
				},
				user: {
					bindMobile: basePath + 'user/bindMobile', //绑定手机号码
					update_password: basePath + 'user/update_password', //更新密码
					register: basePath + 'user/register', //注册
				},
			}
			console.info(path)
			return path
		}

}

module.exports = {
	urls: base.urls,
	pagePath: base.pagePath
}


// const urls = ;


// export const pagesBase = ;
